package com.peter.springcloud.eurekaclient.rest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.netflix.discovery.EurekaClient;
import com.netflix.discovery.shared.Applications;

@RestController
public class DcController {
    @Autowired
    private EurekaClient discoveryClient;
    // private DiscoveryClient discoveryClient;

    @GetMapping("/dc")
    public Applications dc() {
        return discoveryClient.getApplications();
    }
}
